home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3bglobalsettings.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  1.9 KB  |  71 lines

  1. /* 
  2.  *
  3.  * $Id: k3bglobalsettings.h 619556 2007-01-03 17:38:12Z trueg $
  4.  * Copyright (C) 2005 Sebastian Trueg <trueg@k3b.org>
  5.  *
  6.  * This file is part of the K3b project.
  7.  * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  * See the file "COPYING" for the exact licensing terms.
  14.  */
  15.  
  16. #ifndef _K3B_GLOBAL_SETTINGS_H_
  17. #define _K3B_GLOBAL_SETTINGS_H_
  18. #include "k3b_export.h"
  19. class KConfig;
  20.  
  21. /**
  22.  * Some global settings used throughout K3b.
  23.  */
  24. class LIBK3B_EXPORT K3bGlobalSettings
  25. {
  26.  public:
  27.   K3bGlobalSettings();
  28.  
  29.   /**
  30.    * This method takes care of settings the config group
  31.    */
  32.   void readSettings( KConfig* );
  33.  
  34.   /**
  35.    * This method takes care of settings the config group
  36.    */
  37.   void saveSettings( KConfig* );
  38.  
  39.   bool ejectMedia() const { return m_eject; }
  40.   bool burnfree() const { return m_burnfree; }
  41.   bool overburn() const { return m_overburn; }
  42.   bool useManualBufferSize() const { return m_useManualBufferSize; }
  43.   int bufferSize() const { return m_bufferSize; }
  44.  
  45.   /**
  46.    * If force is set to true K3b will continue in certain "unsafe" situations.
  47.    * The most common being a medium not suitable for the writer in terms of
  48.    * writing speed.
  49.    * Compare cdrecord's parameter -force
  50.    */
  51.   bool force() const { return m_force; }
  52.  
  53.   void setEjectMedia( bool b ) { m_eject = b; }
  54.   void setBurnfree( bool b ) { m_burnfree = b; }
  55.   void setOverburn( bool b ) { m_overburn = b; }
  56.   void setUseManualBufferSize( bool b ) { m_useManualBufferSize = b; }
  57.   void setBufferSize( int size ) { m_bufferSize = size; }
  58.   void setForce( bool b ) { m_force = b; }
  59.  
  60.  private:
  61.   bool m_eject;
  62.   bool m_burnfree;
  63.   bool m_overburn;
  64.   bool m_useManualBufferSize;
  65.   int m_bufferSize;
  66.   bool m_force;
  67. };
  68.  
  69.  
  70. #endif
  71.